/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx.mp;

import cn.webrx.config.AppConfig;
import cn.webrx.mapper.DbMapper;
import org.apache.ibatis.session.SqlSession;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
 * <p></p>
 * <p>Powered by webrx On 2023-04-25 11:25:53</p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
@SpringJUnitConfig(AppConfig.class)
public class Demo {
    @Autowired
    ApplicationContext ctx;

    @Autowired
    SqlSession ss;

    @Autowired
    DbMapper dm;

    @Test
    void m2(){
        System.out.println(ss.selectList("dbs"));

        System.out.println(dm.dbs());
    }

    @Test
    void m1(){

        for (String beanDefinitionName : ctx.getBeanDefinitionNames()) {
            System.out.println(beanDefinitionName);
        }
    }
}
